<template>
  <el-drawer
    append-to-body
    :visible.sync="tableEditVisible"
    title="表格配置"
  >
    <avue-form ref="form" v-model="option" :option="formOption" @reset-change="resetChange" @submit="submit" />
  </el-drawer>
</template>

<script>
import { btnOption } from './option'
import { mapMutations } from 'vuex'
export default {
  data() {
    return {
      tableEditVisible: false,
      formOption: btnOption
    }
  },
  computed: {
    option: {
      get() {
        return this.$store.state.tableDesign.option
      },
      set(val) {
        this.SET_OPTION(val)
      }
    }
  },
  methods: {
    ...mapMutations('tableDesign', ['SET_OPTION']),
    show() {
      this.tableEditVisible = true
    },
    resetChange() {},
    submit() {}
  }
}
</script>

<style>

</style>
